We will start by making Controller that doesn't use Service.
● Instead business logic is implemented inside the Controller itself.
● In our example business logic is to return "Hello" String.
● Such approach is not ideal because each Class should do one thing and one thing only.
But in this case Controller does two things
● accepts incoming HTTP Requests
● implements business logic
This causes following problems
● Application becomes harder to maintain and test since everything is in one Class
● Controller becomes big and unreadable by having all of the business logic placed inside its end points.
● To change business logic we need to change the Controller potentially introducing bugs which might
○ affect its main purpose of routing HTTP Requests
○ affect other parts of business logic if Controller becomes corrupted
Application Schema [Results]
Spring Boot Starters